<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The MongoGridFSFile class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="mongogridfs.storeupload.html">« MongoGridFS::storeUpload</a></li>
      <li style="float: right;"><a href="mongogridfsfile.construct.html">MongoGridfsFile::__construct »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="mongo.gridfs.html">GridFS Classes</a></li>
    <li>The MongoGridFSFile class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.mongogridfsfile" class="reference">

 <h1 class="title">The MongoGridFSFile class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL mongo &gt;=0.9.0)</p>


  <div class="section" id="mongogridfsfile.intro">
   <h2 class="title">Introduction</h2>
   <p class="para">
    A database file object.
   </p>
  </div>


  <div class="section" id="mongogridfsfile.synopsis">
   <h2 class="title">Class synopsis</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">MongoGridFSFile</strong>
     </span>
     {</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Fields */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
     <span class="type">array</span>
      <var class="varname">$<var class="varname">file</var></var><span class="initializer"> = <strong><code>null</code></strong></span>
    ;</div>

    <div class="fieldsynopsis">
     <span class="modifier">protected</span>
     <span class="type"><a href="class.mongogridfs.html" class="type MongoGridFS">MongoGridFS</a></span>
      <var class="varname">$<var class="varname">gridfs</var></var><span class="initializer"> = <strong><code>null</code></strong></span>
    ;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Methods */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="mongogridfsfile.construct.html" class="methodname">MongoGridfsFile::__construct</a></span>(<span class="methodparam"><span class="type"><a href="class.mongogridfs.html" class="type MongoGridFS">MongoGridFS</a></span> <code class="parameter">$gridfs</code></span>, <span class="methodparam"><span class="type">array</span> <code class="parameter">$file</code></span>)</div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mongogridfsfile.getbytes.html" class="methodname">getBytes</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mongogridfsfile.getfilename.html" class="methodname">getFilename</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mongogridfsfile.getresource.html" class="methodname">getResource</a></span>(): <span class="type">resource</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mongogridfsfile.getsize.html" class="methodname">getSize</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="mongogridfsfile.write.html" class="methodname">write</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$filename</code><span class="initializer"> = <strong><code>null</code></strong></span></span>): <span class="type">int</span></div>

   }</div>


  </div>

 </div>

 



 





 





 





 





 





 



<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="mongogridfsfile.construct.html">MongoGridfsFile::__construct</a> — Create a new GridFS file</li><li><a href="mongogridfsfile.getbytes.html">MongoGridFSFile::getBytes</a> — Returns this file's contents as a string of bytes</li><li><a href="mongogridfsfile.getfilename.html">MongoGridFSFile::getFilename</a> — Returns this file's filename</li><li><a href="mongogridfsfile.getresource.html">MongoGridFSFile::getResource</a> — Returns a resource that can be used to read the stored file</li><li><a href="mongogridfsfile.getsize.html">MongoGridFSFile::getSize</a> — Returns this file's size</li><li><a href="mongogridfsfile.write.html">MongoGridFSFile::write</a> — Writes this file to the filesystem</li></ul>
</div>
</div></div></body></html>